package com.jzo2o.customer.controller.worker;

import com.jzo2o.common.utils.UserContext;
import com.jzo2o.customer.model.dto.request.WorkerCertificationAuditAddReqDTO;
import com.jzo2o.customer.model.dto.response.RejectReasonResDTO;
import com.jzo2o.customer.service.IServeProviderService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @author: LiuLi
 * @Date: 2025/09/17 下午4:03
 * @Description:
 */
@RestController("workerCertificationController")
@RequestMapping("/worker/worker-certification-audit")
@Api(tags = "服务端 - 认证相关接口")
public class CertificationController {

    @Resource
    private IServeProviderService serveProviderService;

    @PostMapping()
    @ApiOperation("申请实名认证审核")
    public void workerCertificationAudit(@RequestBody WorkerCertificationAuditAddReqDTO workerCertificationAuditAddReqDTO) {
        serveProviderService.workerCertificationAudit(workerCertificationAuditAddReqDTO);
    }

    @GetMapping("/rejectReason")
    @ApiOperation("查看拒绝原因")
    public RejectReasonResDTO rejectReason() {return serveProviderService.rejectReason(UserContext.currentUserId());}

}


